<template>
  <div class="transactions">
    <div class="g-container">
      <h2 class="transactions__title">
        <span class="g-font-black">Notifications</span>
        <div class="g-clickable icon" @click.stop="emitClose">
          <i class="iconfont icon-close"></i>
        </div>
      </h2>
      <div class="transactions__list">
        <table class="g-table g-table--no-padding g-table--left">
          <thead>
            <tr>
              <th>
                <span>Account</span>
              </th>
              <th>
                <span>Height</span>
              </th>
              <th>
                <span>InToken</span>
              </th>
              <th>
                <span>InAmount</span>
              </th>
              <th>
                <span>OutToken</span>
              </th>
              <th>
                <span>OutAmount</span>
              </th>
              <th>
                <span>Hash</span>
              </th>
            </tr>
          </thead>
          <tbody class="g-table--empty">
            <tr>
              <td colspan="8"></td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Transactions",
  props: {
    active: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      list: [],
      loading: false,
      timer: null,
    };
  },
  methods: {
    emitClose() {
      this.$emit("close");
    },
  },
};
</script>

<style lang="scss" scoped>
.transactions {
  padding: 50px 0;
}

.l-container {
  display: flex;
  flex-direction: column;
}

.transactions__title {
  margin: 60px 0 20px 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;

  span {
    font-size: 24px;
    font-family: "Roboto Bold";
  }

  .icon {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--icon-color);

    .iconfont {
      font-size: 20px;
      color: var(--color);
    }
  }
}

.transactions__tab {
  margin-top: 20px;
  flex: 1;
  min-height: 0;
}

.transactions__list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  height: 80vh;
  overflow: hidden;

  .g-table {
    &.g-table--left {
      th:last-child {
        width: 240px;
      }
      td:last-child {
        width: 240px;
      }
    }
  }
}
</style>
